<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./Build/Cesium/Cesium.js"></script>

    <link rel="stylesheet" href="Build/Cesium/Widgets/widgets.css">
</head>
<body>
<div id="cesiumContainer"></div>

<script>
    //TOKEN信息
    Cesium.Ion.defaultAccessToken ='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhODk2YmYzZi02Nzk3LTQxNjctODM0Ni' +
        '01OGVhNTE4MzBlOTgiLCJpZCI6NDMzMjksImlhdCI6MTYxMjQ0MTg5NX0.3iByuAIc6Duo8_7SAscI7DOAzT-AFTM-4OIDfK5iOnA';
    //初始化cesium容器
    var viewer = new Cesium.Viewer("cesiumContainer", {
        homeButton: false,//是否显示Home按钮
        animation: false,//是否显示动画控件
        timeline: false,//是否显示时间线控件
        fullscreenButton: false,
        baseLayerPicker: false,//是否显示图层选择控件
        sceneModePicker: true, //是否显示投影方式控件
        navigationHelpButton: false, //是否显示帮助信息控件
        geocoder: false, //是否显示地名查找控件
        sceneModePicker: false,//是否显示3D/2D选择器
        contextOptions: {
            webgl: {
                alpha: true,
                depth: true,
                stencil: true,
                antialias: true,
                premultipliedAlpha: true,
                //通过canvas.toDataURL()实现截图需要将该项设置为true
                preserveDrawingBuffer: true,
                failIfMajorPerformanceCaveat: true
            }
        }

    })
    let lang=110;
    let lat=40;
    var zfx = viewer.entities.add({  //画正方形
            polygon: {
                hierarchy: Cesium.Cartesian3.fromDegreesArray([
                    lang - 0.0000225, lat - 0.0000225, lang - 0.0000225, lat + 0.0000225, lang + 0.0000225, lat + 0.0000225, lang + 0.0000225, lat - 0.0000225]
                ),
                extrudedHeight: 0,
                height: 0,
                material: Cesium.Color.fromBytes(20,255,235,50),
        outline: false,
        outlineWidth: 100000,
        outlineColor: Cesium.Color.BLACK,
        },

        });
    viewer.zoomTo(zfx);
</script>
</body>
</html>